/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
<p>PaymentQuickConfirm</p>  
<p>Description:֧��ȷ��</p>
 */
public class PaymentQuickConfirm extends MerchantBaseRequest{
	
	private String notify_url;
	private String trade_no;//*����ش� [��Ӧ����] �����������صģ�����ƽ̨���ɵı�ʶҵ���׵ı�ţ����֧�����֡�Ӣ����ĸ���ʹ��
	private String mer_trace;//*����ش� [��Ӧ����] ���һ����ȡ��֤Ҫ�ؽӿ���mer_trace����һ��
	private String amount;//*����ش� [��Ӧ����] ֧�����
	private String bank_mobile_id;//*����ش� ����Ԥ���ֻ���
	private String verify_code;//*����ش� ������֤��
	
	//(card_id��card_holder��identity_type��identity_code��valid_date��cvv2)��(p_agreement_id)��ѡһ���״�δ��ʹ��(card_id��)�������쿨ǩԼ��ʹ��(p_agreement_id)����
	private String card_id;//����ѡ���������CipherUtil.encrypt���ܱ���
	private String card_holder;////����ѡ���������CipherUtil.encrypt���ܱ���
	private String identity_type;////����ѡ�֤�����͹̶���1�����֤��
	private String identity_code;////����ѡ�֤��������CipherUtil.encrypt���ܱ���
	private String valid_date;////����ѡ����ÿ���Ч�ڣ�YYMM������CipherUtil.encrypt���ܱ���
	private String cvv2;////����ѡ����ÿ�CVN2/CVV2����CipherUtil.encrypt���ܱ���
	private String p_agreement_id;////����ѡ�[��Ӧ����] ǩԼЭ��ţ��û�ǩԼ��ֱ��ʹ��֧��ǩԼЭ��Ž����ٴ�֧������
	private String url = "/payment/quick/confirm";

	private String settle_amt;//[��Ӧ����]�������λ��
	private String mer_check_date;//[��Ӧ����]�������ڣ���ʽ��YYYYMMDD
	private String gate_id;//[��Ӧ����]�����б��
	private String last_four_cardid;//[��Ӧ����]���п��ź���λ
	
	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentQuickConfirm doRequest() throws Exception {
		Message<PaymentQuickConfirm> response = UMFUtil.post(createAPIContext(), this,PaymentQuickConfirm.class);
		MerchantBaseRequest baseResult = convertResult(response, PaymentQuickConfirm.class);
		if(baseResult == null)
			return null;
		return (PaymentQuickConfirm)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getCard_id() {
		return card_id;
	}

	public void setCard_id(String card_id) {
		this.card_id = card_id;
	}

	public String getP_agreement_id() {
		return p_agreement_id;
	}

	public void setP_agreement_id(String p_agreement_id) {
		this.p_agreement_id = p_agreement_id;
	}

	public String getBank_mobile_id() {
		return bank_mobile_id;
	}

	public void setBank_mobile_id(String bank_mobile_id) {
		this.bank_mobile_id = bank_mobile_id;
	}

	public String getCard_holder() {
		return card_holder;
	}

	public void setCard_holder(String card_holder) {
		this.card_holder = card_holder;
	}

	public String getIdentity_type() {
		return identity_type;
	}

	public void setIdentity_type(String identity_type) {
		this.identity_type = identity_type;
	}

	public String getIdentity_code() {
		return identity_code;
	}

	public void setIdentity_code(String identity_code) {
		this.identity_code = identity_code;
	}

	public String getValid_date() {
		return valid_date;
	}

	public void setValid_date(String valid_date) {
		this.valid_date = valid_date;
	}

	public String getCvv2() {
		return cvv2;
	}

	public void setCvv2(String cvv2) {
		this.cvv2 = cvv2;
	}

	public String getVerify_code() {
		return verify_code;
	}

	public void setVerify_code(String verify_code) {
		this.verify_code = verify_code;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getSettle_amt() {
		return settle_amt;
	}

	public void setSettle_amt(String settle_amt) {
		this.settle_amt = settle_amt;
	}

	public String getMer_check_date() {
		return mer_check_date;
	}

	public void setMer_check_date(String mer_check_date) {
		this.mer_check_date = mer_check_date;
	}

	public String getGate_id() {
		return gate_id;
	}

	public void setGate_id(String gate_id) {
		this.gate_id = gate_id;
	}

	public String getLast_four_cardid() {
		return last_four_cardid;
	}

	public void setLast_four_cardid(String last_four_cardid) {
		this.last_four_cardid = last_four_cardid;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentQuickConfirm [mer_id=");
		builder.append(mer_id);
		builder.append(", notify_url=");
		builder.append(notify_url);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", bank_mobile_id=");
		builder.append(bank_mobile_id);
		builder.append(", verify_code=");
		builder.append(verify_code);
		builder.append(", card_id=");
		builder.append(card_id);
		builder.append(", card_holder=");
		builder.append(card_holder);
		builder.append(", identity_type=");
		builder.append(identity_type);
		builder.append(", identity_code=");
		builder.append(identity_code);
		builder.append(", valid_date=");
		builder.append(valid_date);
		builder.append(", cvv2=");
		builder.append(cvv2);
		builder.append(", p_agreement_id=");
		builder.append(p_agreement_id);
		builder.append(", url=");
		builder.append(url);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", settle_amt=");
		builder.append(settle_amt);
		builder.append(", mer_check_date=");
		builder.append(mer_check_date);
		builder.append(", gate_id=");
		builder.append(gate_id);
		builder.append(", last_four_cardid=");
		builder.append(last_four_cardid);
		builder.append(", version=");
		builder.append(version);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}
}
